<?php 

/**
* 
*/
class ClassName
{
	public $name='';
	public $color='';

	public function run(){
		echo "run";
	}

	public function __construct(){
		echo "构造函数";
		$this->name='汽车';
		$this->color='blue';
	}

	public function diaoyongSun(){
		$this->sun();
	}

}


/**
* 
*/
class car extends ClassName
{
	protected function sun(){
		echo "<br>";
		echo "私有子类";
		$this->fun();
	}
	private function fun(){
		echo "private";
	}
	
}

// $car = new ClassName();

// $car->name="玛莎拉蒂";
// $car->color='red';
// $car1 = new ClassName();
// var_dump($car1);

// $car->run();

$car = new car();

$car->diaoyongSun();


 ?>